export default class User {
    static insertObj ({username = null, password = null, head_img = null, name = null, intro = null, sex = null, birthday = null, role_ids = null}) {
        if (username !== null && password !== null && name !== null) {
            return{
                username,
                password,
                head_img,
                name,
                intro,
                sex,
                birthday,
                role_ids
            }
        }else{
            return false
        }
    }

    static deleteObj ({id = null}) {
        if(id !== null){
            return {
                id
            }
        }else {
            return false
        }
    }

    static updateObj ({id = null, password = null, head_img = null, name = null, intro = null, sex = null, birthday = null, role_ids = null}) {
        if (id !== null) {
            return{
                id,
                password,
                head_img,
                name,
                intro,
                sex,
                birthday,
                role_ids
            }
        }else{
            return false
        }
    }

    static login ({ username = null, password = null }) {
        if (username !== null && password !== null) {
            return{
                username,
                password
            }
        }else{
            return false
        }
    }
}